package com.chenchao.javageneric;

import java.util.TreeMap;

/**
 * @encoding : UTF-8
 * @Time : 2020/11/13 19:10
 * @Author : Chen Chao
 * @File : javaSE.com.chenchao.javageneric.TreeMapTest.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 * TreeMap会按照key进行排序
 */
public class TreeMapTest {
    public static void main(String[] args) {
        TreeMap<String, Integer> stringIntegerTreeMap = new TreeMap<>();
        stringIntegerTreeMap.put("g",1);
        stringIntegerTreeMap.put("b",1);
        stringIntegerTreeMap.put("c",1);
        stringIntegerTreeMap.put("a",1);
        System.out.println(stringIntegerTreeMap);
        System.out.println(stringIntegerTreeMap.values().getClass().getName());
    }
}
